<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>众筹管理后台</title>
    <script src="/js/jquery.js"></script>
    <link rel="stylesheet" href="/admin/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/admin/css/dashboard.css"/>
    <script  src="/admin/js/bootstrap.min.js"></script>
    <script  src="/admin/js/countUp.js"></script>
    <script>
        $(document).ready(function () {
            $(".look").click(function () {
                var tt=$(this).parent().siblings()
                var pno=$(tt[0]).text();
                alert(pno)
                window.location.href="/projectManagement/getPer?pno="+pno;
            })

            $(".chaxun").click(function () {
                var ptitle = $('input[name=ptitle]').val();
                var uname = $('input[name=uname]').val();
                var pstatus = $('select[name=pstatus]').val();
                var tname = $('select[name=tname]').val();
                alert(ptitle)
                window.location.href="/projectManagement/getPro?ptitle="+ptitle+"&uname="+uname+"&pstatus="+pstatus+"&tname="+tname;
            })
        });
    </script>
</head>
<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">众筹管理平台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">

            <ul class="nav navbar-nav navbar-right">
                <li><a href="../index.jsp">首页</a></li>
                <li><a href="#">欢迎,${manage.mname}</a></li>
                <li><a href="#" title="修改个人资料和密码的页面">设置</a></li>
                <li><a href="#" title="退出登录">退出</a></li>
            </ul>
        </div>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
            <ul class="nav nav-sidebar">
                <li ><a href="/admin/index.jsp">首页</a></li>
            </ul>
            <ul class="nav nav-sidebar">
                <li><a href="/projectManagement/getAll">所有项目*</a></li>
                <li><a href="/projectManagement/getAllNoPro">项目审核</a></li>

                <li><a href="/projectManagement/getAllComment">项目评论</a></li>
                <li><a href="/projectManagement/getAllType">项目分类*</a></li>

            </ul>
            <ul class="nav nav-sidebar">
                <li><a href="/admin/getUsersByCon">注册用户</a></li>
                <li><a href="/admin/getUsersMoney">用户资金</a></li>
                <li><a href="/admin/getUsersReal">实名审核</a></li>
            </ul>
            <ul class="nav nav-sidebar">
                <li><a href="/admin/getNews">新闻管理</a></li>
                <li><a href="/admin/getQuestion">问题管理</a></li>
                <li><a href="/admin/admin_manage.jsp">管理用户</a></li>
                <%--<li><a href="">管理日志</a></li>--%>
            </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <h1 class="page-header">所有众筹项目</h1>

            <div class="panel panel-default">
                <div class="panel-body">
                    <form class="form-inline">
                        <div class="form-group">
                            <input type="text" name="ptitle" class="form-control" id="exampleInputName" placeholder="项目名称">
                        </div>
                        <div class="form-group">
                            <input type="text" name="uname" class="form-control" id="exampleInputName2" placeholder="项目发起人">
                        </div>
                        <div class="form-group">
                            <select class=form-control name="pstatus">
                                <option value="1">待审核</option>
                                <option value="2">不通过</option>
                                <option value="3">即将发布</option>
                                <option value="4">进行中</option>
                                <option value="5">结束</option>
                            </select>
                        </div>
                        <div class="form-group" >
                            <select class=form-control name="tname">
                                <c:forEach items="${typee}" var="type">
                                    <option>${type.tname}</option>
                                </c:forEach>
                            </select>
                        </div>
                        &nbsp;&nbsp;
                        <span class="chaxun">查询</span>
                    </form>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="panel-title">
                        所有项目列表
                    </div>
                </div>
                <div class="panel-body">

                    <div class="table-responsive ">
                        <table class="table table-striped table-bordered">
                            <thead>
                            <tr>
                                <th>序号</th>
                                <th>项目类型</th>
                                <th>项目名称</th>
                                <th>项目进度</th>
                                <th>开始日期</th>
                                <th>结束日期</th>
                                <th>已筹金额</th>
                                <th>发起人</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>

                            <c:forEach items="${sss}" var="project">
                                <tr>
                                    <td>${project.pno}</td>
                                    <td>${project.tname}</td>
                                    <td>${project.ptitle}</td>
                                    <td>${project.praise/project.ptarget*100}%</td>
                                    <td>${project.pstarttime}</td>
                                    <td>2018-05-20</td>
                                    <td>${project.praise}</td>
                                    <td>${project.uname}</td>
                                    <td>
                                        <span class="look" >详情</span>
                                        <!--< a href="#" title="查看项目详情"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></ a>-->
                                        <!--&nbsp;&nbsp;
                                        < a href="#" title="编辑项目信息"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></ a>-->
                                    </td>
                                </tr>
                            </c:forEach>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>




</body>
</html>
